package com.web.entity.dto;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author liuxuhuang
 * @date 2023年05月02日 23:40
 * @desc
 */
@Data
public class UserUpdatePwdDTO2 implements Serializable {
    @NotBlank(message = "旧密码不能为空")
    @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$", message = "密码要包含字母和数字，要求8-16位")
    private String oldPassword;
    @NotBlank(message = "新密码不能为空")
    @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$", message = "密码要包含字母和数字，要求8-16位")
    private String newPassword;
}
